package com.yyfax.pay.config.model.to;

import org.apache.commons.lang3.StringUtils;

import com.yyfax.framework.exception.YYException;
import com.yyfax.framework.model.Params;
import com.yyfax.framework.yyfax.enums.RspCodeEnum;

/**
 * 商户支付限额信息查询参数
 * 
 * @author changxd
 * @date 2017-04-12
 * @since 1.0.0
 */
@SuppressWarnings("serial")
public class PaymentQuotaQueryParams extends Params {

	/** 主键Id id */
	private int id;
	/** 商户编号 merchantCode */
	private String merchantCode;
	/** 支付通道编号 paymentCode */
	private String paymentCode;

	@Override
	public boolean validate() throws YYException {
		if (StringUtils.isBlank(merchantCode)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'merchantCode'不能为空");
		}
		if (StringUtils.isBlank(paymentCode)) {
			throw new YYException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "参数 'paymentCode'不能为空");
		}
		return true;
	}

	public int getid() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getMerchantCode() {
		return merchantCode;
	}

	public void setMerchantCode(String merchantCode) {
		this.merchantCode = merchantCode;
	}

	public String getPaymentCode() {
		return paymentCode;
	}

	public void setPaymentCode(String paymentCode) {
		this.paymentCode = paymentCode;
	}

}
